package com.bootdo.lvyou.dao;

import com.bootdo.lvyou.domain.LvyouCity;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 
 * @author haojiangbo
 * @email 2100272728@qq.com
 * @date 2019-10-10 09:32:09
 */
@Mapper
public interface LvyouCityDao {

	LvyouCity get(Integer id);
	
	List<LvyouCity> list(Map<String,Object> map);
	
	int count(Map<String,Object> map);
	
	int save(LvyouCity lvyouCity);
	
	int update(LvyouCity lvyouCity);
	
	int remove(Integer id);
	
	int batchRemove(Integer[] ids);

	@Select("select *from me_lvyou_city where parent_id=#{cityId}")
    List<LvyouCity> getByCityId(@Param("cityId") Long cityId);

	@Select("select *from me_lvyou_city where parent_id!=0")
	List<LvyouCity> getReTopByAll();
}
